<%@ page contentType="text/html; charset=ISO-8859-1" language="java" %>
<% 
	if ( session.getAttribute("user") != null ) {
		response.sendRedirect("welcome.jsp");
	}

	String message = "";

	String username = "";

	String password = "";
	
	message = (String) request.getAttribute("message");

	username = request.getParameter("username");
	
	password = request.getParameter("password");
	
	
	
%>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Hot Site</title>
<link rel="stylesheet" href="resources/bootstrap/css/bootstrap.css">
<link rel="stylesheet"
	href="resources/bootstrap/css/bootstrap-theme.css">
</head>
<body>

	<div class="container">

		<div class="row">

			<div class="col-md-8 well">

				<% if (message != null)  {%>
				
				<div class="alert alert-danger">
					<h3>Error</h3>
					<%=message %>	
				</div>	
				
				<% } %>
				<form method="post" class="form-horizontal" role="form" 
					  action="login" >

					<div class="col-md-8 form-group">
						<label class="control-label" 
								for="username">Username</label> 
						<input type="text"
							class="form-control"
							id="username" name="username"
							value="<%= username  %>">
					</div>

					<div class="col-md-8 form-group">
						<label class="control-label"
							 for="password">Password</label>
							 
					    <input type="password"
					    	class="form-control"
							id="password" name="password">

					</div>


					<div class="row">

						<div class="col-md-offset-5 col-md-3">
							<button class="btn btn-primary">OK</button>
						</div>

					</div>
				</form>


			</div>

		</div>



	</div>


</body>
</html>